Stealing Reasoning Traces from Proprietary LLM APIs

The landscape of artificial intelligence security has faced a profound shift following the publication of a comprehensive academic study titled Stealing Reasoning Traces from Proprietary LLM APIs. Authored by a team of security researchers, the paper exposes a critical architectural flaw in how major artificial intelligence laboratories handle internal computational data. As frontier models increasingly rely on step-by-step internal deliberations—commonly referred to as chain-of-thought or reasoning traces—providers have implemented various safeguards to protect these proprietary outputs from competitors and malicious actors. However, this new research demonstrates that a widespread industry practice of offloading encrypted state data to the client side has inadvertently created a systemic vulnerability. This flaw allows bad actors to bypass complex defenses, extract sensitive internal logic, harvest private user data, and manipulate autonomous agentic systems.
Background and Evolution of Client-Side State Management
To understand the gravity of the newly uncovered vulnerability, one must examine the operational constraints facing large language model providers. Modern reasoning models—capable of complex mathematics, coding, and multi-step problem-solving—generate extensive internal monologues before delivering a final answer to a user. Exposing these raw traces poses significant commercial risks, as competitors could easily distill the capabilities of a multi-billion-dollar frontier model into smaller, open-weight architectures without incurring the massive training costs. Furthermore, raw reasoning traces frequently contain unfiltered intermediate thoughts, policy checks, and raw prompt data that companies prefer to keep confidential.
To manage these computational overheads without maintaining massive, costly session databases on their own servers, several prominent providers—including Anthropic, OpenAI, and Google—adopted a stateless architecture for handling session continuity. Instead of retaining the chain-of-thought on server-side memory caches tied to a secure session identifier, the infrastructure serializes the reasoning trace, encrypts it, and returns it to the client application as an opaque block of text. The client-side application is then responsible for holding onto this encrypted blob and passing it back to the application programming interface with every subsequent turn in the conversation. This mechanism mimics standard web development practices like stateless JSON Web Tokens, where the server signs or encrypts state data and trusts the client to return it unmodified.
The Architectural Vulnerability and the Decryption Jailbreak
The core of the security failure lies not in the encryption algorithms themselves, but in how providers handle authorization, session isolation, and cross-model compatibility within their respective ecosystems. The researchers discovered that the encrypted reasoning blocks returned by frontier models are fully compatible and interchangeable across different sessions, distinct user accounts, and even entirely different model tiers within the same corporate ecosystem.
This lack of strict cryptographic binding between the encrypted state block, the specific user session, and the exact model instance that generated it creates a severe vulnerability. The research team successfully engineered a scalable decryption jailbreak that weaponizes this compatibility. Rather than attempting to directly attack or jailbreak a heavily guarded, highly capable frontier model—which typically employs robust alignment and safety guardrails—an adversary can target a weaker, less safeguarded model from the same provider.
By taking an encrypted reasoning trace harvested from a sophisticated model and injecting it into the API endpoint of a smaller, less secure sibling model, the attacker forces the weaker model to ingest, decode, and output the proprietary trace verbatim in plain text. Because the underlying cryptographic keys and serialization formats are shared across models within the same corporate family, the weaker model readily decrypts data it was never intended to see, completely circumventing the security boundaries established by the provider.
Four Distinct Attack Vectors Identified by Researchers
The implications of this architectural oversight extend far beyond mere intellectual property theft. The academic paper outlines four distinct, highly dangerous attack vectors made possible by the decryption jailbreak technique, each presenting unique risks to developers, enterprises, and end-users.
First, the vulnerability effectively shatters anti-distillation defenses. For years, AI developers have implemented strict terms of service and technical restrictions to prevent competitors from using their frontier models to train rival systems. By utilizing the cross-model injection technique across major commercial platforms like Anthropic, OpenAI, and Google, adversaries can systematically extract high-quality, step-by-step reasoning traces en masse. These traces provide a masterclass in synthetic data generation, allowing malicious entities to bootstrap highly capable reasoning models at a fraction of the traditional development cost.
Second, the flaw enables large-scale private data extraction through unsuspecting developers. Application developers frequently share debugging logs, error reports, and conversation transcripts publicly on code repositories and forums, often remaining entirely unaware of the sensitive contents hidden within the encrypted reasoning blocks attached to those logs. The research team demonstrated the real-world severity of this vector by scraping 315,320 reasoning blocks from public repositories. By applying their decryption methodology, they successfully recovered 367 Personally Identifiable Information artifacts and 182 functional API credentials and passwords that had been inadvertently leaked by developers trusting the opacity of the encrypted text.
Third, the vulnerability exposes hazardous information that was ostensibly filtered out by safety filters. It is common for a frontier model to entertain dangerous, unethical, or illegal concepts during its internal chain-of-thought phase before recognizing the violation and delivering a safe, sanitized refusal to the user. While the final output successfully rejects the malicious request, the underlying hazardous information often remains intact within the encrypted reasoning trace. By forcing the decryption of these traces via weaker models, attackers can harvest raw, unfiltered instructions for cyberattacks, chemical synthesis, or other dangerous activities that the safety alignment layers were designed to suppress.
Fourth, the flaw opens the door to invisible prompt injections capable of poisoning public agentic rollouts. As autonomous AI agents become more prevalent—capable of executing code, browsing the web, and interacting with APIs on behalf of users—they increasingly rely on multi-turn reasoning traces to maintain state. Attackers can embed malicious payloads entirely within encrypted reasoning blocks, effectively hiding instructions from human reviewers and standard security scanners. When an autonomous agent processes these poisoned blocks in subsequent execution loops, it executes the hidden instructions, leading to severe system compromise or unauthorized actions.
Data and Methodology of the Discovery
The scale of the vulnerability was demonstrated through empirical analysis conducted by the research team across multiple commercial application programming interfaces. By analyzing the cryptographic handling of state across industry-leading platforms, the researchers mapped out the exact parameters required to exploit the lack of session and model binding.
The recovery of over 300,000 reasoning blocks from public code repositories highlights a critical blind spot in modern software development. Developers working with state-of-the-art reasoning APIs frequently treat encrypted strings as harmless, unreadable noise. The extraction of nearly 400 PII records and close to 200 hardcoded credentials underscores that sensitive user data and enterprise secrets are routinely passing through LLM reasoning loops and being preserved in client-side logs without proper sanitization. This empirical evidence transitions the threat from a theoretical cryptographic curiosity to an urgent operational risk for any organization deploying modern AI infrastructure.
Industry Response and Proposed Mitigations
Following responsible disclosure protocols, the researchers presented their findings to the affected artificial intelligence providers prior to the public release of the academic paper. The discovery has prompted an immediate reassessment of client-side state management architectures across the artificial intelligence sector.
To secure client-side reasoning against these advanced extraction methods, the authors of the paper proposed concrete cryptographic and system-level mitigations. First, providers must implement strict cryptographic binding, ensuring that encrypted reasoning blocks are inextricably linked to a specific user session, a unique request identifier, and the exact model version that generated them. If a block is transferred to a different model tier or an unauthorized session, the decryption routine must fail instantly.
Second, providers are advised to move away from purely stateless client-side storage for sensitive reasoning traces, or alternatively, to implement robust authenticated encryption with associated data to prevent cross-context replay attacks. Sanitization pipelines must also be improved to ensure that intermediate reasoning steps are rigorously scrubbed of sensitive PII, credentials, and hazardous concepts before the state is serialized and returned to the client application.
Broader Impact and Future Implications for Artificial Intelligence Security
The disclosure of this vulnerability marks a turning point in the ongoing cat-and-mouse game between AI security researchers and commercial laboratories. As models become more complex and autonomous, the mechanisms used to control them must evolve beyond traditional software paradigms. The assumption that encryption alone is sufficient to protect proprietary data has proven false when applied to multi-tiered, interconnected model ecosystems.
For enterprise adopters, the findings serve as a stark warning regarding the handling of logs and debugging data in environments utilizing reasoning models. Organizations must update their data governance policies to treat encrypted API state blocks with the same level of security and classification as raw plaintext logs containing credentials or personal data.
As artificial intelligence providers race to patch these architectural weaknesses, the industry faces a broader reckoning regarding transparency, intellectual property protection, and safety alignment. Ensuring that reasoning traces remain secure without compromising the performance and scalability of modern LLM infrastructure will require a fundamental tightening of cryptographic standards across the entire artificial intelligence development lifecycle.







